package com.autumn.cloud.demo.common.service.impl;

import com.autumn.cloud.demo.common.service.ProviderCommonService;
import com.autumn.cloud.demo.common.configure.ProviderProperties;

/**
 * <p>
 * </p>
 *
 * @description TODO
 * @author: 老码农
 * @create: 2020-12-11 01:28
 **/
public class ProviderCommonServiceImpl implements ProviderCommonService {

    private final ProviderProperties providerProperties;

    public ProviderCommonServiceImpl(ProviderProperties providerProperties) {
        this.providerProperties = providerProperties;
    }

    @Override
    public String getDemoServiceName() {
        return this.providerProperties.getDemoService();
    }

    @Override
    public String getDemoServiceUrl() {
        return "http://" + this.getDemoServiceName();
    }
}
